import request from '@/utils/request'


//新接口
// 查询机构信息
export function QueryEnterInstInfoList(UrlParams,body) {
  console.log('query',{
    url: '/elder/enterInstInfoNew/page',
    method: 'post',
    params: UrlParams,
    data:body
  });
  return request({
    url: '/elder/enterInstInfoNew/page',
    method: 'post',
    params: UrlParams,
    data:body
  })
}

// 查询机构信息(同步)
export async function QueryEnterInstInfoListAsync(UrlParams,body) {
  return await request({
    url: '/elder/enterInstInfoNew/page',
    method: 'post',
    params: UrlParams,
    data:body
  })
}

// 查询指定机构详细信息
export function getEnterInstInfo(Id) {
  return request({
    url: '/elder/enterInstInfoNew/' + Id,
    method: 'get'
  })
}

// 新增机构信息
export function addEnterInstInfo(data) {
  // console.log('addRtInfo',{
  //   url: '/elder/enterInstInfo/save',
  //   method: 'post',
  //   data: data
  // });
  return request({
    url: '/elder/enterInstInfoNew/save',
    method: 'post',
    data: data
  })
}

// 修改机构信息
export function updateEnterInstInfo(data) {
  return request({
    url: '/elder/enterInstInfoNew/update',
    method: 'post',
    data: data
  })
}

// 删除机构信息
export function delEnterInstInfo(Ids) {
  return request({
    url: '/elder/enterInstInfoNew/delete',
    method: 'delete',
    data:Ids
  })
}

//dev-api/tool/map/getLatLngByAddr
// 根据地址获取经纬度信息
export function GetLongitudeAndlatitudeByAddress(UrlParams) {
  return request({
    url: '/tool/map/getLatLngByAddr',
    method: 'get',
    params: UrlParams,
    data:null
  })
}

//dev-api/system/administrativeDivisions/getAdministrativeDivisions
// 查询分级行政区域
export function getAdministrativeDivisions(UrlParams) {
  return request({
    url: '/system/administrativeDivisions/getAdministrativeDivisions',
    method: 'get',
    params: UrlParams,
    data:null
  })
}